﻿#include "test.h"

Test::Test():m_a(0),m_p(nullptr)
{

}

Test::~Test()
{
    delete[]m_p;
    m_p=nullptr;
}

Test::Test(const Test &t):m_a(t.m_a),m_p(nullptr)
{
    if(t.m_p)
    {
    this->m_p=new int[t.m_a];
    memcpy(this->m_p,t.m_p,this->m_a*sizeof(int));
    }
}

void Test::Tnum(int a)
{
    m_a=a;
}
